|
|
|
|
|
|
|
Learn to read and write INI files |
|
|
|
|
|
|
|
|
Learn about the system Registry |
|
|
|
|
|
|
|
|
Learn to use the Registry API calls |
|
|
|
|
|
|
|
|
Learn to use GetSetting and SaveSetting |
|
|
|
|
|
|
|
|
Sample Project File: \Chapter29\UserStorage.vbp |
|
|
|
|
|
|
|
|
An INI file is simply a text file with a predefined structure. The structure is very simple, so retrieving information from it is very easy. An INI file has one or more sections defined by square brackets ([]) around a user-defined name. Next, youll see a defined key name, an equal sign (=), and then a value for that key. Heres an example: |
|
|
|
 |
|
|
|
|
; UserStorage.ini
[Database]
Path=D:\Database\
File=Employee.mdb
JetMDB=-1
OnServer=0
Version=1.1.1
[Env]
Toolbar=-1
StatusBar=0
Menus=-1 |
|
|
|
|
|
|
|
|
In this listing, [Database] is a section, Path= is a key name, and D:\Database\ is the value for the Path key. To retrieve and write this information, you need to use some API calls. Lets look at each one, in turn, in the first example (see Figure 29.1). |
|
|
|
|
|
|
|
|
Examples Filename: INI.frm |
|
|
|
|
|